package first.endtoend

class AddressService
{

    def serviceMethod()
    {

    }

    def toJson(anAddress)
    {

        if (anAddress)
        {
            [
                    id          : anAddress.id,
                    numStreet   : anAddress.numStreet,
                    nameStreet  : anAddress.nameStreet,
                    zipCode     : anAddress.zipCode,
                    localityName: anAddress.localityName
            ]
        } else
        {

        }

    }
}
